//
//  CinemaView.m
//  代号：47
//
//  Created by lanou3g on 15/7/10.
//  Copyright (c) 2015年 杨佩璋. All rights reserved.
//

#import "CinemaView.h"

@implementation CinemaView
-(void)dealloc{
    [_label1 release];
    [_label2 release];
    [_labelHD release];

    [super dealloc];

}

-(instancetype)initWithFrame:(CGRect)frame{

    self = [super initWithFrame:frame];
    if (self) {
     
        UILabel *labelYY = [[[UILabel alloc] initWithFrame:CGRectMake(20, 10, kScreen_width, 30)] autorelease];
        labelYY.text = @"影院地址：";
        _labelHD = [[[UILabel alloc] initWithFrame:CGRectMake(20, 50, kScreen_width, 30)] autorelease];
        _labelHD.text = @"近期活动：";
        
        
        labelYY.font = [UIFont boldSystemFontOfSize:16];
        _labelHD.font = [UIFont boldSystemFontOfSize:16];
        
        [self addSubview:labelYY];
        [self addSubview:_labelHD];
        
        self.label1 = [[[UILabel alloc] initWithFrame:CGRectMake(30, 30, kScreen_width - 40, 1)] autorelease];
        _label1.backgroundColor = [UIColor whiteColor];
        _label1.numberOfLines = 0;
        _label1.font = [UIFont systemFontOfSize:15];
        
        self.label2 = [[[UILabel alloc] initWithFrame:CGRectMake(30, 30, kScreen_width - 40, 1)] autorelease];
        _label2.backgroundColor = [UIColor whiteColor];
        _label2.numberOfLines = 0;
        _label2.font = [UIFont systemFontOfSize:15];
        
        
        [self addSubview:_label1];
        [self addSubview:_label2];
        
        
        
    }
    return self;



}
-(CGFloat)zishiying:(NSString *)string{

    NSDictionary *dict = [NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:15] forKey:NSFontAttributeName];
    CGRect rect = [string boundingRectWithSize:CGSizeMake(kScreen_width - 40, 0) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin) attributes:dict context:nil];
    return rect.size.height;

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
